<!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">	
	 <link rel="stylesheet" href="passenger/css/ui-box.css?v=202022">
    <link rel="stylesheet" href="passenger/css/ui-base.css?v=202022">
    <link rel="stylesheet" href="passenger/css/ui-position.css?v=202022">
    <link rel="stylesheet" href="passenger/css/ui-img.css?v=202022">
    <link rel="stylesheet" href="passenger/css/ui-color.css?v=202022">
    <link rel="stylesheet" href="passenger/css/ui-input.css?v=202022">
    <link rel="stylesheet" href="passenger/css/iBox.css?v=202022">
	
	<style>
		.res15
		{
			background-image:url('css/images/rarrow.png')!important;
		}
		.colors{
			background-color:#EDF1FB;
		}
	</style>
</head>
<body class="um-vp c-wh ub-ver colors" ontouchstart >
   <div class="uinn">航班信息</div>
   <!--列表开始-->
<div class="c-wh uinn ulev-1">
	<ul id="list">
	<li class=" pr">
    <div class="ub ub-ac">
    <div class="ub-img mr6 ulev2" id="icon"></div>
    <div class="c2 fs101" id="carrier" style="font-weight:600"></div>
    <div class="ub-f1 c31 fs9 ml8 uhide" flightDate style="font-family: arial;"></div>
    <div class="ub-f1"></div>
    </div>
    <div class="ub mt4 pl16 pr16" style="margin-left:0.7em">
    <div class="ub ub-ver ub-ac tx-r pr2 c31">
    <div class="ub ub-ac ub-f1 mb7">
    <div class="mr3 fs8">计飞</div>
    <div class="fs11" id="std">--：--</div>
    </div>
    <div class="ub ub-ac ub-f1 " showAt="normal">
    <div class="mr3 fs8">实飞</div>
    <div class="c7 fs11" id="atd">--：--</div>
    </div>
    </div>
    <div class="ub ub-f1 ub-ver ub-ac ub-pc">
    </div>
    <div class="ub ub-ver ub-as ub-pe c31">
    <div class="ub ub-as ub-f1 ub-pe mb7">
    <div class="ub ub-ac">
    <div class="mr3 fs8">计到</div>
    <div class="fs11" id="sta">--：--</div>
    </div>
    </div>
    <div class="ub ub-ac ub-f1 ub-pe " showAt="normal">
    <div class="mr3 fs8">实到</div>
    <div class="c7 fs11" id="ata">--：--</div>
    </div>
    </div>
    </div>
    </li>
	</ul>
</div>
	<div class="ub umar-t">
	    <div class="ub-f1 ub c-wh sel">
	        <div class="ub-f1 ut-s uinn ulev-1 tx-l t-gra ulh-sel">模板一</div>
	        <div class=" umw2 ub ub-pc ub-ac">
	            <div class="ub-img umw1 umh1 res3"></div>
	        </div>
	        <select name="sel0" selectedindex="0" id="sel0" onchange="zy_selectmenu(this.id)">
	            <option >模板一</option>
				<option disabled=disabled>更多模板，敬请期待</option>
	        </select>
	    </div>
	</div>
	<!--下拉列表结束-->
	<div class="uinn  ulev-1">其它信息</div> 
	<div class="c-wh uinn t-gra ulev0">
    <!--文本输入开始-->
	<div class="ub b-gra ulab uba umar-t uc-a1 ub-ac">
	    <div class="uinn ulim c-gra  ulev-1">旅客选择</div>
	    <div class="ub-f1 c-wh uinput uinn3 ulev-1" id="phone" style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
	    </div>
		<div class="uinn res15 ub-img " onclick="openPassenger()" style="height:.1em;margin-right:.5em"></div>
	</div>
	<div class="ub b-gra ulab uba umar-t uc-a1 ulev-1 ">
	    <div class="uinn ulim c-gra">领取柜台</div>
	    <div class="ub-f1 c-wh uinput uinn ">
	        <input placeholder="" type="text" id="counter" onchange="setCotent('gui',this.value)" class="uc-a1">
	    </div>
	</div>
	<div class="ub b-gra ulab uba umar-t uc-a1   ulev-1">
	    <div class="uinn ulim c-gra">领取食品</div>
	    <div class="ub-f1 c-wh uinput uinn">
	        <input placeholder="" type="text" id="food" onchange="setCotent('wu',this.value)" class="uc-a1">
	    </div>
	</div><div class="ub b-gra  uba umar-t uc-a1 uhide  ulev-1">
	    <div class="uinn ulim c-gra ">酒店安排	</div>
	    <div class="ub-f1 c-wh uinput uinn">
	        <input placeholder="" type="text" class="uc-a1">
	    </div>
	</div>
	<!--文本输入结束-->
	<!--文本输入开始-->
	<div id="showText" class="uba c-wh b-gra uinput uinn4 umar-t umar-b  ulev-1" style="height:6em">
	    尊敬的<font id="names">XXX</font>旅客，请您到<font id="gui">XXX</font>柜台，领取您的<font id="wu">XXX</font>	，给您带来的不便我们深表抱歉。
	</div>
	<!--文本输入结束-->
	<!--按钮开始-->
	<!--按钮结束-->
	</div>
<div ontouchstart="zy_touch('btn-act')" style="position:fixed;bottom:0em;width:100%;background-color:#1D98F5" class="btn uba uinn5 t-wh tx-c"  onclick="uploadData()">确定</div>


</body>
<script src="js/zy_control.js?v=202022"></script>
<script src="js/zy_click.js?v=202022"></script>
<script src="js/zy_event.js?v=202022"></script>
<script src="js/jquery.js?v=202022"></script>
<script src="js/iBox.js?v=202022"></script>
<script src="passenger/js/common.js"></script>
<script>
zy_init();
window.uexOnload=function(type)
{
	if(!type){
		var pageJson = JSON.parse(getStorage("pageJson"));
		$("#carrier").html(pageJson.carrier+pageJson.flightNo);
		$("#std").html(pageJson.std);
		$("#atd").html(pageJson.atd);
		$("#ata").html(pageJson.ata);
		$("#sta").html(pageJson.sta);
		setIcon(pageJson.carrier);
	}
	function setIcon(type){
    var carrier = {
        "MU": "img182",
        "FM": "img11",
        "KN": "img62"
    };
    $("#icon").addClass(carrier[type] || "img153");
	}
	
}

//旅客信息页面
function openPassenger(){
	 uexWindow.open("passenger", 0, "passenger.html", 2, "", "", "4", 280);
}
//设置名字显示
function setPhone(){
	var names = localStorage.getItem("names");
	$("#phone").html(names);
	var showName = names.split(",");
	$("#names").html(showName[0])
}
//改变模板显示
function setCotent(type,value){
	$("#"+type).html(value);
}	

function uploadData(){
	var phone = $("#phone").html().trim();
	var counter = $("#counter").val().trim();
	var food = $("#food").val().trim();
	if(phone.length==0){
		 $.iBoxMsg("请选择旅客");
	}else if(counter.length==0||food.length==0){
		$.iBoxMsg("领取柜台和领取物品不能为空"+phone);
	}else{
	 	var strPhone = localStorage.getItem("phones"); 
		if(strPhone!=null&&strPhone!=undefined&&strPhone!=''){
			$.iBoxWait();
			strPhone = JSON.parse(strPhone);
			var arryList = [];
			for(var i =0;i<strPhone.length;i++){
				var pushStr="尊敬的"+strPhone[i].names+"旅客，请您到"+counter+"柜台，领取您的"+food+"，给您带来的不便我们深表抱歉。";
			    var json ={'content':pushStr,'phone':strPhone[i].phone};
				arryList.push(json);
			}
		     $.ajax({
			      type: "get",
			        contentType: 'application/json',
			        dataType: "json",
			        url: pushMsgUrl+JSON.stringify(arryList),
			        cache: false,
			        success: function(data){
			                if (data.status == 0) {
								 $.iBoxMsg("短信发送成功");
								 $("#phone").html("");
								 $("#counter").val("");
								 $("#food").val("");
								 $("#showText").html('尊敬的<font id="names">XXX</font>旅客，请您到<font id="gui">XXX</font>柜台，领取您的<font id="wu">XXX</font>	，给您带来的不便我们深表抱歉。');
			                }else{
								 $.iBoxMsg("请求失败");
							}
			        },
			        error: function(data){
			             $.iBoxMsg("网络异常");
			        }
			    });
	}
	}
}
</script>
</html>